<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者，助力中小企业发展
// +----------------------------------------------------------------------
// | Copyright (c) 2017～2024  www.wdadmin.cn    All rights reserved.
// +----------------------------------------------------------------------
// | Wdadmin系统产品软件并不是自由软件，不加密，并不代表开源，未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn>   www.wdadmin.cn
// +----------------------------------------------------------------------
/**
 * Class Order
 * Desc  订单校验
 * Create on 2024/10/28 17:36
 * Create by wangyafang
 */

namespace app\api\validate\wddj\driver;


use think\Validate;

class Order extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'id'=>'require',
        'lng'=>'require',
        'lat'=>'require',
        'start_date'=>'require',
        'end_date'=>'require',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'id.require'=>'请输入订单ID',
        'lng.require'=>'经度不能为空',
        'lat.require'=>'纬度不能为空',
        'start_date.require'=>'查询开始日期不能为空',
        'end_date.require'=>'查询结束日期不能为空',
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'start_itinerary'  => ['id'],
        'arrive_at_destination'  => ['id','lng','lat'],
        'cancel'  => ['id'],
        'statistics'  => ['start_date','end_date'],
    ];
}



 